LIBRARY IEEE; 
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_ARITH.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;

--Circuito que verifica se nenhum CI foi identificado, um ou mais de um

ENTITY decider IS

    PORT(ic: IN STD_LOGIC_VECTOR(11 DOWNTO 0);
		  ic_found: OUT STD_LOGIC_VECTOR(1 DOWNTO 0) := "10");

END decider;

ARCHITECTURE logic OF decider IS

BEGIN

    PROCESS(ic)
	 BEGIN
	     IF(ic = "000000000000") THEN
		      ic_found <= "00";
        ELSIF(ic = "100000000000" OR ic = "010000000000" OR
            ic = "001000000000" OR ic = "000100000000" OR
            ic = "000010000000" OR ic = "000001000000" OR
				ic = "000000100000" OR ic = "000000010000" OR
				ic = "000000001000" OR ic = "000000000100" OR
				ic = "000000000010" OR ic = "000000000001") THEN
            ic_found <= "01";
        ELSE
            ic_found <= "10";
        END IF;
    END PROCESS;

END logic;